$(function () {
    var my_seq = [
        { e: $('#floor'), p: { opacity: 1, width: 0, height: 0 }, o: { duration: 0, complete:function(){
            $.Velocity.RunSequence(my_H);
            $.Velocity.RunSequence(my_T);
            $.Velocity.RunSequence(my_M);
            $.Velocity.RunSequence(my_L);
            $.Velocity.RunSequence(my_HTML5);
            $.Velocity.RunSequence(my_C);
            $.Velocity.RunSequence(my_S);
            $.Velocity.RunSequence(my_S2);
        }} },
        { e: $('#floor'), p: { width: 874, height: 172 }, o: { duration: 500 } },
        { e: $('#M-lg'), p: { opacity: 1, bottom: '100%'}, o: { duration: 0 } },
        { e: $('#M-lg'), p: { bottom: 100}, o: { duration: 300 } },
        { e: $('#JS'), p: { top: -100 }, o: { duration: 0 } },
        { e: $('#JS'), p: { opacity: 1, top: 36 }, o: { duration: 500, delay: 1500 } },
        { e: $('#light_big'), p: { opacity: 1 }, o: { duration: 500, delay: 500 } },
        { e: $('#light_ray'), p: { opacity: 1 }, o: { duration: 500 } }
    ];
    var my_H = [
        { e: $('#H'), p: { top: 100, left: 0 }, o: { duration: 0 } },
        { e: $('#H'), p: { opacity: 1 }, o: { duration: 300, delay: 1000 } },
        { e: $('#H'), p: { top: 167, left: 287 }, o: { duration: 500, delay: 1000 } }
    ]
    var my_T = [
        { e: $('#T'), p: { top: 270, left: 100 }, o: { duration: 0 } },
        { e: $('#T'), p: { opacity: 1 }, o: { duration: 300, delay: 1000 } },
        { e: $('#T'), p: { top: 189, left: 363 }, o: { duration: 500, delay: 1000 } }
    ]
    var my_M = [
        { e: $('#M'), p: { top: 100, left: 700 }, o: { duration: 0 } },
        { e: $('#M'), p: { opacity: 1 }, o: { duration: 300, delay: 1000 } },
        { e: $('#M'), p: { top: 206, left: 416 }, o: { duration: 500, delay: 1000 } }
    ]
    var my_L = [
        { e: $('#L'), p: { top: 260, left: 650 }, o: { duration: 0 } },
        { e: $('#L'), p: { opacity: 1 }, o: { duration: 300, delay: 1000 } },
        { e: $('#L'), p: { top: 224, left: 491 }, o: { duration: 500, delay: 1000 } }
    ]
    var my_HTML5 = [
        { e: $('#HTML5'), p: { top: 100, left: 530 }, o: { duration: 0 } },
        { e: $('#HTML5'), p: { opacity: 1 }, o: { duration: 100, delay: 1000 } },
        { e: $('#HTML5'), p: { top: 235, left: 530 }, o: { duration: 500, delay: 1000 } }
    ]
    var my_C = [
        { e: $('#C'), p: { top: -100, left: -100 }, o: { duration: 0 } },
        { e: $('#C'), p: { opacity: 1 }, o: { duration: 300, delay: 1300 } },
        { e: $('#C'), p: { top: -100, left: 300 }, o: { duration: 300, delay: 700 } },
        { e: $('#C'), p: { top: 60, left: 300 }, o: { duration: 100, delay: 500 } }
    ]
    var my_S = [
        { e: $('#S'), p: { top: 100, left: 300 }, o: { duration: 0 } },
        { e: $('#S'), p: { opacity: 1 }, o: { duration: 300, delay: 1300 } },
        { e: $('#S'), p: { top: -65, left: 390 }, o: { duration: 300, delay: 700 } },
        { e: $('#S'), p: { top: 95, left: 390 }, o: { duration: 200, delay: 500 } }
    ]
    var my_S2 = [
        { e: $('#S2'), p: { top: 0, left: 900 }, o: { duration: 0 } },
        { e: $('#S2'), p: { opacity: 1 }, o: { duration: 300, delay: 1300 } },
        { e: $('#S2'), p: { top: -36, left: 473 }, o: { duration: 300, delay: 700 } },
        {e: $('#S2'), p: { top: 124, left: 473 }, o: {duration: 300, delay: 500, complete: function () {
            $.Velocity.RunSequence(my_CSS3);
            $.Velocity.RunSequence(my_light_ray_1);
            $.Velocity.RunSequence(my_light_ray_2);
        }} },
        
    ]
    var my_CSS3 = [
        { e: $('#CSS3'), p: { top: 200, left: 200 }, o: { duration: 0 } },
        { e: $('#CSS3'), p: { opacity: 1, top: 15, left: 350 }, o: { duration: 500 } }
    ]
    var my_light_ray_1 = [
        { e: $('#light_1'), p: { top: 100, left: 300 }, o: { duration: 0 } },
        { e: $('#light_1'), p: { opacity: 1, top: 50, left: 360 }, o: { duration: 300 } },
        { e: $('#light_ray_1'), p: { opacity: 1}, o: { duration: 500, delay: 200 } }
    ]
    var my_light_ray_2 = [
        { e: $('#light_2'), p: { top: 135, left: 390 }, o: { duration: 0 } },
        { e: $('#light_2'), p: { opacity: 1, top: 85, left: 451 }, o: { duration: 500 } },
        { e: $('#light_ray_2'), p: { opacity: 1}, o: { duration: 500 } }
    ]
    $.Velocity.RunSequence(my_seq);
})